<?php
class LanguageController{
	public $lang;
	
	function __construct($lang_=null){
		global $parameters;
		$instaledLanguage = unserialize(LANGU);
		$this->lang = (isset($instaledLanguage[$lang_])) ? $lang_ : $parameters['info']['language'];
	}
	public function selectAction(){
		global $config,$objSession;
		$config->__lang = $objSession->userLanguage =  $this->lang;
		tools::_redirect($config->page.".html",null,0,'php');
	}
	

}